home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / Video.mod < prev    next >
Encoding:
Text File  |  1995-08-07  |  22.7 KB  |  544 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        Video.mod
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$TAGS-*)
  21. (*$CALLING PASCAL*)
  22. MODULE Video;
  23.  
  24. IMPORT SYSTEM, Types, Quickdraw;
  25.  
  26. (* $PUSH*)
  27. (* $ALIGN MAC68K*)
  28. (* $LibExport+*)
  29.  
  30. CONST
  31.     mBaseOffset*                    = 1;                            (*Id of mBaseOffset.*)
  32.     mRowBytes*                    = 2;                            (*Video sResource parameter Id's *)
  33.     mBounds*                        = 3;                            (*Video sResource parameter Id's *)
  34.     mVersion*                    = 4;                            (*Video sResource parameter Id's *)
  35.     mHRes*                        = 5;                            (*Video sResource parameter Id's *)
  36.     mVRes*                        = 6;                            (*Video sResource parameter Id's *)
  37.     mPixelType*                    = 7;                            (*Video sResource parameter Id's *)
  38.     mPixelSize*                    = 8;                            (*Video sResource parameter Id's *)
  39.     mCmpCount*                    = 9;                            (*Video sResource parameter Id's *)
  40.     mCmpSize*                    = 10;                            (*Video sResource parameter Id's *)
  41.     mPlaneBytes*                    = 11;                            (*Video sResource parameter Id's *)
  42.     mVertRefRate*                = 14;                            (*Video sResource parameter Id's *)
  43.     mVidParams*                    = 1;                            (*Video parameter block id.*)
  44.     mTable*                        = 2;                            (*Offset to the table.*)
  45.     mPageCnt*                    = 3;                            (*Number of pages*)
  46.     mDevType*                    = 4;                            (*Device Type*)
  47.     oneBitMode*                    = 128;                            (*Id of OneBitMode Parameter list.*)
  48.     twoBitMode*                    = 129;                            (*Id of TwoBitMode Parameter list.*)
  49.     fourBitMode*                    = 130;                            (*Id of FourBitMode Parameter list.*)
  50.     eightBitMode*                = 131;                            (*Id of EightBitMode Parameter list.*)
  51.  
  52.     sixteenBitMode*                = 132;                            (*Id of SixteenBitMode Parameter list.*)
  53.     thirtyTwoBitMode*            = 133;                            (*Id of ThirtyTwoBitMode Parameter list.*)
  54.     firstVidMode*                = 128;                            (*The new, better way to do the above. *)
  55.     secondVidMode*                = 129;                            (* QuickDraw only supports six video *)
  56.     thirdVidMode*                = 130;                            (* at this time.      *)
  57.     fourthVidMode*                = 131;
  58.     fifthVidMode*                = 132;
  59.     sixthVidMode*                = 133;
  60.     spGammaDir*                    = 64;
  61.     spVidNamesDir*                = 65;
  62.  
  63. (* csTimingFormat values in VDTimingInfo *)
  64. (* look in the declaration rom for timing info *)
  65.     kDeclROMtables*                = LONG("decl");
  66.  
  67. (* Timing mode constants for Display Manager MultiMode support
  68.     Corresponding    .h equates are in Video.h
  69.                     .a equates are in Video.a
  70.                     .r equates are in DepVideoEqu.r
  71. *)
  72.     timingInvalid*                = 0;                            (* Unknown timing… force user to confirm.*)
  73.     timingApple12*                = 130;                            (*  512x384 (60 Hz) Rubik timing.*)
  74.     timingApple12x*                = 135;                            (*  560x384 (60 Hz) Rubik-560 timing.*)
  75.     timingApple13*                = 140;                            (*  640x480 (67 Hz) HR timing.*)
  76.     timingApple13x*                = 145;                            (*  640x400 (67 Hz) HR-400 timing.*)
  77.     timingAppleVGA*                = 150;                            (*  640x480 (60 Hz) VGA timing.*)
  78.     timingApple15*                = 160;                            (*  640x870 (75 Hz) FPD timing.*)
  79.     timingApple15x*                = 165;                            (*  640x818 (75 Hz) FPD-818 timing.*)
  80.     timingApple16*                = 170;                            (*  832x624 (75 Hz) GoldFish timing.*)
  81.     timingAppleSVGA*                = 180;                            (*  800x600 (56 Hz) SVGA timing.*)
  82.     timingApple1Ka*                = 190;                            (* 1024x768 (60 Hz) VESA 1K-60Hz timing.*)
  83.     timingApple1Kb*                = 200;                            (* 1024x768 (70 Hz) VESA 1K-70Hz timing.*)
  84.     timingApple19*                = 210;                            (* 1024x768 (75 Hz) Apple 19" RGB.*)
  85.     timingApple21*                = 220;                            (* 1152x870 (75 Hz) Apple 21" RGB.*)
  86.     timingAppleNTSC_ST*            = 230;                            (*  512x384 (60 Hz, interlaced, non-convolved).*)
  87.     timingAppleNTSC_FF*            = 232;                            (*  640x480 (60 Hz, interlaced, non-convolved).*)
  88.     timingAppleNTSC_STconv*        = 234;                            (*  512x384 (60 Hz, interlaced, convolved).*)
  89.     timingAppleNTSC_FFconv*        = 236;                            (*  640x480 (60 Hz, interlaced, convolved).*)
  90.     timingApplePAL_ST*            = 238;                            (*  640x480 (50 Hz, interlaced, non-convolved).*)
  91.     timingApplePAL_FF*            = 240;                            (*  768x576 (50 Hz, interlaced, non-convolved).*)
  92.     timingApplePAL_STconv*        = 242;                            (*  640x480 (50 Hz, interlaced, non-convolved).*)
  93.     timingApplePAL_FFconv*        = 244;                            (*  768x576 (50 Hz, interlaced, non-convolved).*)
  94.  
  95. (* csConnectFlags values in VDDisplayConnectInfo *)
  96.     kAllModesValid*                = 0;                            (* All modes not trimmed by primary init are good close enough to try *)
  97.     kAllModesSafe*                = 1;                            (* All modes not trimmed by primary init are know to be safe *)
  98.     kReportsTagging*                = 2;                            (* Can detect tagged displays (to identify smart monitors) *)
  99.     kHasDirectConnection*        = 3;                            (* True implies that driver can talk directly to device (e.g. serial data link via sense lines) *)
  100.     kIsMonoDev*                    = 4;                            (* Says whether there’s an RGB (0) or Monochrome (1) connection. *)
  101.     kUncertainConnection*        = 5;                            (* There may not be a display (no sense lines?). *)
  102.     kTaggingInfoNonStandard*        = 6;                            (* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). *)
  103.     kReportsDDCConnection*        = 7;                            (* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). *)
  104.     kHasDDCConnection*            = 8;                            (* Card has ddc connect now. *)
  105.  
  106. (* csDisplayType values in VDDisplayConnectInfo *)
  107.     kUnknownConnect*                = 1;                            (* Not sure how we’ll use this, but seems like a good idea. *)
  108.     kPanelConnect*                = 2;                            (* For use with fixed-in-place LCD panels. *)
  109.     kPanelTFTConnect*            = 2;                            (* Alias for kPanelConnect *)
  110.     kFixedModeCRTConnect*        = 3;                            (*  For use with fixed-mode (i.e., very limited range) displays. *)
  111.     kMultiModeCRT1Connect*        = 4;                            (* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe *)
  112.     kMultiModeCRT2Connect*        = 5;                            (* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe *)
  113.     kMultiModeCRT3Connect*        = 6;                            (* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain *)
  114.     kMultiModeCRT4Connect*        = 7;                            (* Expansion to large multi mode (not yet used) *)
  115.     kModelessConnect*            = 8;                            (* Expansion to modeless model (not yet used) *)
  116.     kFullPageConnect*            = 9;                            (* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) *)
  117.     kVGAConnect*                    = 10;                            (* 640x480 VGA default -- question everything else *)
  118.     kNTSCConnect*                = 11;                            (* NTSC ST (default), FF, STconv, FFconv *)
  119.     kPALConnect*                    = 12;                            (* PAL ST (default), FF, STconv, FFconv *)
  120.     kHRConnect*                    = 13;                            (* 640x400 (to get 8bpp in 256K case) and 640x480 (these two only) *)
  121.     kPanelFSTNConnect*            = 14;                            (* For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels *)
  122.  
  123. (* csTimingFlags values in VDTimingInfoRec *)
  124.     kModeValid*                    = 0;                            (* Says that this mode should NOT be trimmed. *)
  125.     kModeSafe*                    = 1;                            (* This mode does not need confirmation *)
  126.     kModeDefault*                = 2;                            (* This is the default mode for this type of connection *)
  127.     kModeShowNow*                = 3;                            (* This mode should always be shown (even though it may require a confirm) *)
  128.     kModeNotResize*                = 4;                            (* This mode should not be used to resize the display (eg. mode selects a different connector on card) *)
  129.     kModeRequiresPan*            = 5;                            (* This mode has more pixels than are actually displayed *)
  130.  
  131. (* Control Codes *)
  132.     cscReset*                    = 0;
  133.     cscKillIO*                    = 1;
  134.     cscSetMode*                    = 2;
  135.     cscSetEntries*                = 3;
  136.     cscSetGamma*                    = 4;
  137.     cscGrayPage*                    = 5;
  138.     cscGrayScreen*                = 5;
  139.     cscSetGray*                    = 6;
  140.     cscSetInterrupt*                = 7;
  141.     cscDirectSetEntries*            = 8;
  142.     cscSetDefaultMode*            = 9;
  143.     cscSwitchMode*                = 10;
  144.     cscSetSync*                    = 11;
  145.     cscSavePreferredConfiguration* = 16;
  146.     cscSetHardwareCursor*        = 22;
  147.     cscDrawHardwareCursor*        = 23;
  148.     cscSetConvolution*            = 24;
  149.     cscUnusedCall*                = 127;                            (* This call used to expend the scrn resource.  Its imbedded data contains more control info *)
  150.  
  151. (* Status Codes *)
  152.     cscGetMode*                    = 2;
  153.     cscGetEntries*                = 3;
  154.     cscGetPageCnt*                = 4;
  155.     cscGetPages*                    = 4;                            (* This is what C&D 2 calls it. *)
  156.     cscGetPageBase*                = 5;
  157.     cscGetBaseAddr*                = 5;                            (* This is what C&D 2 calls it. *)
  158.     cscGetGray*                    = 6;
  159.     cscGetInterrupt*                = 7;
  160.     cscGetGamma*                    = 8;
  161.     cscGetDefaultMode*            = 9;
  162.     cscGetCurMode*                = 10;
  163.     cscGetSync*                    = 11;
  164.     cscGetConnection*            = 12;                            (* Return information about the connection to the display *)
  165.     cscGetModeTiming*            = 13;                            (* Return timing info for a mode *)
  166.     cscGetModeBaseAddress*        = 14;                            (* Return base address information about a particular mode *)
  167.     cscGetScanProc*                = 15;                            (* QuickTime scan chasing routine *)
  168.     cscGetPreferredConfiguration* = 16;
  169.     cscGetNextResolution*        = 17;
  170.     cscGetVideoParameters*        = 18;
  171.     cscGetGammaList*                = 19;                            (* Obsolete *)
  172.     cscGetGammaInfoList*            = 20;
  173.     cscRetrieveGammaTable*        = 21;
  174.     cscSupportsHardwareCursor*    = 22;
  175.     cscGetConvolution*            = 24;
  176.  
  177. (* Bit definitions for the Get/Set Sync call*)
  178.     kDisableHorizontalSyncBit*    = 0;
  179.     kDisableVerticalSyncBit*        = 1;
  180.     kDisableCompositeSyncBit*    = 2;
  181.     kEnableSyncOnBlue*            = 3;
  182.     kEnableSyncOnGreen*            = 4;
  183.     kEnableSyncOnRed*            = 5;
  184.     kNoSeparateSyncControlBit*    = 6;
  185.     kHorizontalSyncMask*            = $01;
  186.     kVerticalSyncMask*            = $02;
  187.     kCompositeSyncMask*            = $04;
  188.     kDPMSSyncMask*                = $7;
  189.     kSyncOnBlueMask*                = $08;
  190.     kSyncOnGreenMask*            = $10;
  191.     kSyncOnRedMask*                = $20;
  192.     kSyncOnMask*                    = $38;
  193.  
  194. (*    Power Mode constants for translating DPMS modes to Get/SetSync calls.    *)
  195.     kDPMSSyncOn*                    = 0;
  196.     kDPMSSyncStandby*            = 1;
  197.     kDPMSSyncSuspend*            = 2;
  198.     kDPMSSyncOff*                = 7;
  199.  
  200. (* Bit definitions for the Get/Set Convolution call*)
  201.     kConvolved*                    = 0;
  202.     kLiveVideoPassThru*            = 1;
  203.     kConvolvedMask*                = $01;
  204.     kLiveVideoPassThruMask*        = $02;
  205.  
  206.  
  207. TYPE
  208.     VPBlock* = RECORD
  209.         vpBaseOffset*:            LONGINT;                                (*Offset to page zero of video RAM (From minorBaseOS).*)
  210.         vpRowBytes*:                INTEGER;                                (*Width of each row of video memory.*)
  211.         vpBounds*:                Types.Rect;                                    (*BoundsRect for the video display (gives dimensions).*)
  212.         vpVersion*:                INTEGER;                                (*PixelMap version number.*)
  213.         vpPackType*:                INTEGER;
  214.         vpPackSize*:                LONGINT;
  215.         vpHRes*:                    LONGINT;                                (*Horizontal resolution of the device (pixels per inch).*)
  216.         vpVRes*:                    LONGINT;                                (*Vertical resolution of the device (pixels per inch).*)
  217.         vpPixelType*:            INTEGER;                                (*Defines the pixel type.*)
  218.         vpPixelSize*:            INTEGER;                                (*Number of bits in pixel.*)
  219.         vpCmpCount*:                INTEGER;                                (*Number of components in pixel.*)
  220.         vpCmpSize*:                INTEGER;                                (*Number of bits per component*)
  221.         vpPlaneBytes*:            LONGINT;                                (*Offset from one plane to the next.*)
  222.     END;
  223.  
  224.     VPBlockPtr* = POINTER TO VPBlock;
  225.  
  226.     VDEntryRecord* = RECORD
  227.         csTable*:                Types.Ptr;                                    (*(long) pointer to color table entry=value, r,g,b:INTEGER*)
  228.     END;
  229.  
  230.     VDEntRecPtr* = POINTER TO VDEntryRecord;
  231.  
  232. (* Parm block for SetGray control call *)
  233.     VDGrayRecord* = RECORD
  234.         csMode*:                    BOOLEAN;                                (*Same as GDDevType value (0=mono, 1=color)*)
  235.     END;
  236.  
  237.     VDGrayPtr* = POINTER TO VDGrayRecord;
  238.  
  239. (* Parm block for SetEntries control call *)
  240.     VDSetEntryRecord* = RECORD
  241.         csTable*:                POINTER TO Quickdraw.ColorSpec;                                (*Pointer to an array of color specs*)
  242.         csStart*:                INTEGER;                                (*Which spec in array to start with, or -1*)
  243.         csCount*:                INTEGER;                                (*Number of color spec entries to set*)
  244.     END;
  245.  
  246.     VDSetEntryPtr* = POINTER TO VDSetEntryRecord;
  247.  
  248. (* Parm block for SetGamma control call *)
  249.     VDGammaRecord* = RECORD
  250.         csGTable*:                Types.Ptr;                                    (*pointer to gamma table*)
  251.     END;
  252.  
  253.     VDGamRecPtr* = POINTER TO VDGammaRecord;
  254.  
  255.     VDBaseAddressInfoRec* = RECORD
  256.         csDevData*:                LONGINT;                                (* LONGINT - (long) timing mode *)
  257.         csDevBase*:                LONGINT;                                (* LONGINT - (long) base address of the mode *)
  258.         csModeReserved*:            INTEGER;                                (* INTEGER - (short) will some day be the depth *)
  259.         csModeBase*:                LONGINT;                                (* LONGINT - (long) reserved *)
  260.     END;
  261.  
  262.     VDBaseAddressInfoPtr* = POINTER TO VDBaseAddressInfoRec;
  263.  
  264.     VDSwitchInfoRec* = RECORD
  265.         csMode*:                    INTEGER;                                (*(word) mode depth*)
  266.         csData*:                    LONGINT;                                (*(long) functional sResource of mode*)
  267.         csPage*:                    INTEGER;                                (*(word) page to switch in*)
  268.         csBaseAddr*:                Types.Ptr;                                    (*(long) base address of page (return value)*)
  269.         csReserved*:                LONGINT;                                (*(long) Reserved (set to 0) *)
  270.     END;
  271.  
  272.     VDSwitchInfoPtr* = POINTER TO VDSwitchInfoRec;
  273.  
  274.     VDTimingInfoRec* = RECORD
  275.         csTimingMode*:            LONGINT;                                (* LONGINT - (long) timing mode (a la InitGDevice) *)
  276.         csTimingReserved*:        LONGINT;                                (* LONGINT - (long) reserved *)
  277.         csTimingFormat*:            LONGINT;                                (* LONGINT - (long) what format is the timing info *)
  278.         csTimingData*:            LONGINT;                                (* LONGINT - (long) data supplied by driver *)
  279.         csTimingFlags*:            LONGINT;                                (* LONGINT - (long) mode within device *)
  280.     END;
  281.  
  282.     VDTimingInfoPtr* = POINTER TO VDTimingInfoRec;
  283.  
  284.     VDDisplayConnectInfoRec* = RECORD
  285.         csDisplayType*:            INTEGER;                                (* INTEGER - (word) Type of display connected *)
  286.         csConnectTaggedType*:    Types.SInt8; (* unsigned char *)                (* BYTE - type of tagging *)
  287.         csConnectTaggedData*:    Types.SInt8; (* unsigned char *)                (* BYTE - tagging data *)
  288.         csConnectFlags*:            LONGINT;                                (* LONGINT - (long) tell us about the connection *)
  289.         csDisplayComponent*:        LONGINT;                                (* LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) *)
  290.         csConnectReserved*:        LONGINT;                                (* LONGINT - (long) reserved *)
  291.     END;
  292.  
  293.     VDDisplayConnectInfoPtr* = POINTER TO VDDisplayConnectInfoRec;
  294.  
  295. (* RawSenseCode
  296.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  297.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  298.  
  299.     For 'standard' sense code hardware, the raw sense is obtained as follows*:
  300.         • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  301.         • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  302.  
  303.     IMPORTANT Note*: 
  304.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  305.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  306.  
  307. *)
  308.     RawSenseCode* = CHAR;
  309.  
  310.  
  311. CONST
  312.     kRSCZero*                    = 0;
  313.     kRSCOne*                        = 1;
  314.     kRSCTwo*                        = 2;
  315.     kRSCThree*                    = 3;
  316.     kRSCFour*                    = 4;
  317.     kRSCFive*                    = 5;
  318.     kRSCSix*                        = 6;
  319.     kRSCSeven*                    = 7;
  320.  
  321. (* ExtendedSenseCode
  322.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  323.     for the values which are possible when the extended sense algorithm is applied to hardware
  324.     which implements 'standard' sense code hardware.
  325.  
  326.      For 'standard' sense code hardware, the extended sense code algorithm is as follows*:
  327.     (Note:  as described here, sense line 'A' corresponds to LONG("2', ")BLONG(" to ")1', and 'CLONG(" to ")0')
  328.         • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  329.         • Drive sense line 'B' low and read the values of 'A' and 'C'.
  330.         • Drive sense line 'C' low and read the values of 'A' and 'B'.
  331.  
  332.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  333.  
  334.     IMPORTANT Note*: 
  335.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  336.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  337.  
  338. *)
  339.     
  340. TYPE
  341.     ExtendedSenseCode* = CHAR;
  342.  
  343.  
  344. CONST
  345.     kESCZero21Inch*                = $00;                            (* 21" RGB                                 *)
  346.     kESCOnePortraitMono*            = $14;                            (* Portrait Monochrome                     *)
  347.     kESCTwo12Inch*                = $21;                            (* 12" RGB                                *)
  348.     kESCThree21InchRadius*        = $31;                            (* 21" RGB (Radius)                        *)
  349.     kESCThree21InchMonoRadius*    = $34;                            (* 21" Monochrome (Radius)                 *)
  350.     kESCThree21InchMono*            = $35;                            (* 21" Monochrome                        *)
  351.     kESCFourNTSC*                = $0A;                            (* NTSC                                 *)
  352.     kESCFivePortrait*            = $1E;                            (* Portrait RGB                         *)
  353.     kESCSixMSB1*                    = $03;                            (* MultiScan Band-1 (12" thru 1Six")    *)
  354.     kESCSixMSB2*                    = $0B;                            (* MultiScan Band-2 (13" thru 19")        *)
  355.     kESCSixMSB3*                    = $23;                            (* MultiScan Band-3 (13" thru 21")        *)
  356.     kESCSixStandard*                = $2B;                            (* 13"/14" RGB or 12" Monochrome        *)
  357.     kESCSevenPAL*                = $00;                            (* PAL                                    *)
  358.     kESCSevenNTSC*                = $14;                            (* NTSC                                 *)
  359.     kESCSevenVGA*                = $17;                            (* VGA                                     *)
  360.     kESCSeven16Inch*                = $2D;                            (* 16" RGB (GoldFish)                      *)
  361.     kESCSevenPALAlternate*        = $30;                            (* PAL (Alternate)                         *)
  362.     kESCSeven19Inch*                = $3A;                            (* Third-Party 19”                        *)
  363.     kESCSevenNoDisplay*            = $3F;                            (* No display connected                 *)
  364.  
  365.  
  366. TYPE
  367.     VDPageInfo* = RECORD
  368.         csMode*:                    INTEGER;                                (*(word) mode within device*)
  369.         csData*:                    LONGINT;                                (*(long) data supplied by driver*)
  370.         csPage*:                    INTEGER;                                (*(word) page to switch in*)
  371.         csBaseAddr*:                Types.Ptr;                                    (*(long) base address of page*)
  372.     END;
  373.  
  374.     VDPgInfoPtr* = POINTER TO VDPageInfo;
  375.  
  376.     VDSizeInfo* = RECORD
  377.         csHSize*:                INTEGER;                                (*(word) desired/returned h size*)
  378.         csHPos*:                    INTEGER;                                (*(word) desired/returned h position*)
  379.         csVSize*:                INTEGER;                                (*(word) desired/returned v size*)
  380.         csVPos*:                    INTEGER;                                (*(word) desired/returned v position*)
  381.     END;
  382.  
  383.     VDSzInfoPtr* = POINTER TO VDSizeInfo;
  384.  
  385.     VDSettings* = RECORD
  386.         csParamCnt*:                INTEGER;                                (*(word) number of params*)
  387.         csBrightMax*:            INTEGER;                                (*(word) max brightness*)
  388.         csBrightDef*:            INTEGER;                                (*(word) default brightness*)
  389.         csBrightVal*:            INTEGER;                                (*(word) current brightness*)
  390.         csCntrstMax*:            INTEGER;                                (*(word) max contrast*)
  391.         csCntrstDef*:            INTEGER;                                (*(word) default contrast*)
  392.         csCntrstVal*:            INTEGER;                                (*(word) current contrast*)
  393.         csTintMax*:                INTEGER;                                (*(word) max tint*)
  394.         csTintDef*:                INTEGER;                                (*(word) default tint*)
  395.         csTintVal*:                INTEGER;                                (*(word) current tint*)
  396.         csHueMax*:                INTEGER;                                (*(word) max hue*)
  397.         csHueDef*:                INTEGER;                                (*(word) default hue*)
  398.         csHueVal*:                INTEGER;                                (*(word) current hue*)
  399.         csHorizDef*:                INTEGER;                                (*(word) default horizontal*)
  400.         csHorizVal*:                INTEGER;                                (*(word) current horizontal*)
  401.         csHorizMax*:                INTEGER;                                (*(word) max horizontal*)
  402.         csVertDef*:                INTEGER;                                (*(word) default vertical*)
  403.         csVertVal*:                INTEGER;                                (*(word) current vertical*)
  404.         csVertMax*:                INTEGER;                                (*(word) max vertical*)
  405.     END;
  406.  
  407.     VDSettingsPtr* = POINTER TO VDSettings;
  408.  
  409.     DisplayModeID* = LONGINT;
  410.  
  411.     VideoDeviceType* = LONGINT;
  412.  
  413.     GammaTableID* = LONGINT;
  414.  
  415. (* DepthMode
  416.     This abstract data type is used to to reference RELATIVE pixel depths.
  417.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  418.  
  419.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  420.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  421.     hardware, 'kDepthMode1' may represent 8BPP.
  422.  
  423.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  424.     behave as expected.  The values of the constants which comprise the set are such
  425.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  426. *)
  427.     DepthMode* = INTEGER;
  428.  
  429.  
  430. CONST
  431.     kDepthMode1*                    = 128;
  432.     kDepthMode2*                    = 129;
  433.     kDepthMode3*                    = 130;
  434.     kDepthMode4*                    = 131;
  435.     kDepthMode5*                    = 132;
  436.     kDepthMode6*                    = 133;
  437.  
  438.     kFirstDepthMode*                = 128;                            (* These constants are obsolete, and just included    *)
  439.     kSecondDepthMode*            = 129;                            (* for clients that have converted to the above        *)
  440.     kThirdDepthMode*                = 130;                            (* kDepthModeXXX constants.                            *)
  441.     kFourthDepthMode*            = 131;
  442.     kFifthDepthMode*                = 132;
  443.     kSixthDepthMode*                = 133;
  444.  
  445.  
  446. TYPE
  447.     VDResolutionInfoRec* = RECORD
  448.         csPreviousDisplayModeID*: DisplayModeID;                            (* AIFF.ID of the previous resolution in a chain *)
  449.         csDisplayModeID*:        DisplayModeID;                            (* AIFF.ID of the next resolution *)
  450.         csHorizontalPixels*:        LONGINT;                                (* # of pixels in a horizontal line *)
  451.         csVerticalLines*:        LONGINT;                                (* # of lines in a screen *)
  452.         csRefreshRate*:            Types.Fixed;                                    (* Vertical Refresh Rate in Hz *)
  453.         csMaxDepthMode*:            DepthMode;                                (* 0x80-based number representing max bit depth *)
  454.         csReserved*:                LONGINT;                                (* Reserved *)
  455.         csReserved1*:            LONGINT;                                (* Reserved *)
  456.     END;
  457.  
  458.     VDResolutionInfoPtr* = POINTER TO VDResolutionInfoRec;
  459.  
  460.     VDVideoParametersInfoRec* = RECORD
  461.         csDisplayModeID*:        DisplayModeID;                            (* the AIFF.ID of the resolution we want info on *)
  462.         csDepthMode*:            DepthMode;                                (* The bit depth we want the info on (0x80 based) *)
  463.         csVPBlockPtr*:            VPBlockPtr;                                (* Pointer to a video parameter block *)
  464.         csPageCount*:            LONGINT;                                (* Number of pages supported by the resolution *)
  465.         csDeviceType*:            VideoDeviceType;                        (* Device Type*:  Direct, Types.Fixed or CLUT; *)
  466.         csReserved*:                LONGINT;                                (* Reserved *)
  467.     END;
  468.  
  469.     VDVideoParametersInfoPtr* = POINTER TO VDVideoParametersInfoRec;
  470.  
  471.     VDGammaInfoRec* = RECORD
  472.         csLastGammaID*:            GammaTableID;                            (* the AIFF.ID of the previous gamma table *)
  473.         csNextGammaID*:            GammaTableID;                            (* the AIFF.ID of the next gamma table *)
  474.         csGammaPtr*:                Types.Ptr;                                    (* Types.Ptr to a gamma table data *)
  475.         csReserved*:                LONGINT;                                (* Reserved *)
  476.     END;
  477.  
  478.     VDGammaInfoPtr* = POINTER TO VDGammaInfoRec;
  479.  
  480.     VDGetGammaListRec* = RECORD
  481.         csPreviousGammaTableID*:    GammaTableID;                            (* AIFF.ID of the previous gamma table *)
  482.         csGammaTableID*:            GammaTableID;                            (* AIFF.ID of the gamma table following csPreviousDisplayModeID *)
  483.         csGammaTableSize*:        LONGINT;                                (* Memory.Size of the gamma table in bytes *)
  484.         csGammaTableName*:        SYSTEM.PTR (*ΔΔ POINTER TO CHAR*);                                    (* Gamma table name (c-string) *)
  485.     END;
  486.  
  487.     VDGetGammaListPtr* = POINTER TO VDGetGammaListRec;
  488.  
  489.     VDRetrieveGammaRec* = RECORD
  490.         csGammaTableID*:            GammaTableID;                            (* AIFF.ID of gamma table to retrieve *)
  491.         csGammaTablePtr*:        POINTER TO Quickdraw.GammaTbl;                                (* Location to copy desired gamma to *)
  492.     END;
  493.  
  494.     VDRetrieveGammaPtr* = POINTER TO VDRetrieveGammaRec;
  495.  
  496.     VDSetHardwareCursorRec* = RECORD
  497.         csCursorRef*:            Types.Ptr;
  498.     END;
  499.  
  500.     VDSetHardwareCursorPtr* = POINTER TO VDSetHardwareCursorRec;
  501.  
  502.     VDDrawHardwareCursorRec* = RECORD
  503.         csCursorX*:                LONGINT;
  504.         csCursorY*:                LONGINT;
  505.         csCursorVisible*:        LONGINT;
  506.     END;
  507.  
  508.     VDDrawHardwareCursorPtr* = POINTER TO VDDrawHardwareCursorRec;
  509.  
  510.     VDSupportsHardwareCursorRec* = RECORD
  511.         csSupportsHardwareCursor*: BOOLEAN;                                (* True if hardware cursor is supported *)
  512.     END;
  513.  
  514.     VDSupportsHardwareCursorPtr* = POINTER TO VDSupportsHardwareCursorRec;
  515.  
  516.     VDDefMode* = RECORD
  517.         csID*:                    Types.SInt8; (* UInt8 *)
  518.     END;
  519.  
  520.     VDDefModePtr* = POINTER TO VDDefMode;
  521.  
  522.     VDSyncInfoRec* = RECORD
  523.         csMode*:                    Types.SInt8; (* UInt8 *)
  524.         csFlags*:                Types.SInt8; (* UInt8 *)
  525.     END;
  526.  
  527.     VDSyncInfoPtr* = POINTER TO VDSyncInfoRec;
  528.  
  529.     VDConvolutionInfoRec* = RECORD
  530.         csDisplayModeID*:        DisplayModeID;                            (* the AIFF.ID of the resolution we want info on *)
  531.         csDepthMode*:            DepthMode;                                (* The bit depth we want the info on (0x80 based) *)
  532.         csPage*:                    LONGINT;
  533.         csFlags*:                Types.UInt32;
  534.         csReserved*:                Types.UInt32;
  535.     END;
  536.  
  537.     VDConvolutionInfoPtr* = POINTER TO VDConvolutionInfoRec;
  538.  
  539.  
  540. (* $ALIGN RESET*)
  541. (* $POP*)
  542.  
  543.  END Video.
  544.